package com.haopt.annotation.conditional;

import com.haopt.annotation.addcontainer.Tear;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * 根据ClassCondition类的matches方法返回true创建User对象
 * @author haopt
 */
@Configuration
public class UserConfig {

    @Bean
    @Conditional(ClassCondition.class)
    public Tear user(){
        return new Tear();
    }
}
